namespace Intelli.Cust.Svcs.Models
{
    public class AppSettings
    {
        public LangChainSettings LangChain { get; set; } = new();
        public MESApiSettings MESApi { get; set; } = new();
        public VectorDatabaseSettings VectorDatabase { get; set; } = new();
    }

    public class LangChainSettings
    {
        public string OpenAIApiKey { get; set; } = string.Empty;
        public string ModelName { get; set; } = "gpt-3.5-turbo";
        public double Temperature { get; set; } = 0.7;
        public int MaxTokens { get; set; } = 2000;
        public int RequestTimeoutSeconds { get; set; } = 30;
        // 新增：LLM 提供方（OpenAI 或 DashScope）以及可选自定义 BaseUrl
        public string Provider { get; set; } = "OpenAI"; // OpenAI | DashScope
        public string? BaseUrl { get; set; } // 覆盖默认端点
        public int HistoryMaxTurns { get; set; } = 10;
        public int HistoryMaxTokens { get; set; } = 0;
    }

    public class MESApiSettings
    {
        public string BaseUrl { get; set; } = string.Empty;
        public string ApiKey { get; set; } = string.Empty;
        public int TimeoutSeconds { get; set; } = 30;
        public int MaxRetries { get; set; } = 3;
    }

    public class VectorDatabaseSettings
    {
        public string QdrantUrl { get; set; } = "http://localhost:6333";
        public string CollectionName { get; set; } = "mes_knowledge";
        public int VectorSize { get; set; } = 1536;
        public double SimilarityThreshold { get; set; } = 0.7;
    }
} 